package com.css.gdzj.gdzjbxgd.modules.reportinfo.repository;

import com.css.gdzj.gdzjbxgd.modules.reportinfo.repository.entity.BxgdReportInfoEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

/**
 * @author z
 * @date 2020-12-11
 */
public interface BxgdReportInfoRepository extends JpaRepository<BxgdReportInfoEntity, String> {
    @Query(value = "select count(*) from bxgd_report_info where CREATE_USER = :userId and REPORT_YEAR = :reportYear",nativeQuery = true)
    int getUserReportCount(@Param("userId") String userId, @Param("reportYear") String reportYear);

}
